#!/usr/bin/env python
from pygame import *

def split_strip(strip, width, height, images):
    index = 0
    ret = []
    for y in range (0, strip.get_height(), height):
        for x in range(0, strip.get_width(), width):
            index += 1
            surf = Surface((width, height), HWSURFACE|SRCALPHA)
            surf.blit(strip, (0, 0), (x, y, width, height))
            ret.append(surf)
            if index == images:
                return ret
    return ret